package org.xy.bean;

import java.util.ArrayList;
import java.util.List;

public class BeanWapper {
	private Bean current = null;
	private List<BeanWapper> childs = null;

	public BeanWapper(Bean current) {
		this.current = current;
	}

	public Bean getCurrent() {
		return this.current;
	}

	public void setCurrent(Bean current) {
		this.current = current;
	}

	public List<BeanWapper> getChilds() {
		return this.childs;
	}

	public int childSize() {
		return this.childs == null ? 0 : this.childs.size();
	}

	public void addChild(BeanWapper child) {
		if (child == null) {
			return;
		}
		if (this.childs == null) {
			this.childs = new ArrayList<BeanWapper>();
		}
		this.childs.add(child);
	}

}
